<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Joe's Fish and Chips</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="mainStyles.css" rel="stylesheet" type="text/css" />

  </head>
  <body><div id="wrapper">
	<!--<h1><a href="index.php">Joe's Fish and Chips</a></h1>-->
	<div id="header"><a href="index.php"><img src="images/fishHeader.jpg" alt="Joe's Home"></a></div>

<?php

    createMenu( "inventory" );
    createMenu( "product" );
    createMenu( "order" );

    function createMenu ($subject) {

        if ( $_REQUEST['section'] == $subject ) {
            echo "<div class=\"selectedHeadBlock\"> ";
        }
        else {
            echo "<div class=\"headBlock\"> ";
        }

        echo "<ul>";

        createMenuItem("view", $subject);
        createMenuItem("add", $subject);
        createMenuItem("edit name", $subject);
        createMenuItem("edit qty", $subject);
        createMenuItem("delete", $subject);

        echo "</ul><div class=\"title\">" . $subject . "</div></div>";
        
      
    }

    function createMenuItem($action,$subject) {
        echo "<li><a ";
        if ( $_REQUEST['section'] == $subject && $_REQUEST['action'] == $action ) {
            //echo "class=\"selected\" ";
			echo "style=\"font-weight:bold; text-decoration:none; \" ";
        }
        echo "href=\"?section=" . $subject . "&action=" . $action . "\">" . $action . "</a></li>\n";
    }
?>
